home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / il / ilIndexableStack.z / ilIndexableStack
Encoding:
Text File  |  2002-10-03  |  7.5 KB  |  199 lines

  1.  
  2.  
  3.  
  4. iiiillllIIIInnnnddddeeeexxxxaaaabbbblllleeeeSSSSttttaaaacccckkkk((((3333))))                   IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      iiiillllIIIInnnnddddeeeexxxxaaaabbbblllleeeeSSSSttttaaaacccckkkk - Indexable list managed as a stack
  10.  
  11. IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
  12.      ilIndexableList : ilIndexableStack
  13.  
  14. HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
  15.      #include <il/ilIndexableStack.h>
  16.  
  17. CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      ilIndexableStack is publicly derived from ilIndexableList and it manages
  19.      an indexable list as a stack. So in addition to the functions inherited
  20.      from ilIndexableList, _p_u_s_h(), _p_o_p() ,_s_w_a_p() and other methods are
  21.      provided. One added feature is that the _p_u_s_h() and _p_o_p() functions can be
  22.      disallowed access to the bottom of the stack using the _s_e_t_B_o_t_t_o_m()
  23.      function. As a result _p_u_s_h() and _p_o_p() will consider the item above the
  24.      bottom as their bottom. This feature can be used to manage a stack of
  25.      images, for example, where the bottom of the stack is the background
  26.      image.
  27.  
  28. CCCCLLLLAAAASSSSSSSS MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN SSSSUUUUMMMMMMMMAAAARRRRYYYY
  29.      CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrr
  30.  
  31.           ilIndexableStack()
  32.  
  33.  
  34.      EEEEddddiiiittttiiiinnnngggg
  35.  
  36.           void push(ilLinkItem* item = NULL, int count = 0)
  37.           void pop(ilLinkItem* item = NULL, int count = 0)
  38.           void swap(ilLinkItem* item1, ilLinkItem* item2)
  39.           void setBootom(ilLinkItem* item)
  40.           void clrBottom()
  41.  
  42.      QQQQuuuueeeerrrryyyy
  43.  
  44.           int getItemIndex(ilLinkItem* item)
  45.           ilLinkItem* getBottom()
  46.           int hasBottom()
  47.  
  48.  
  49. FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
  50.      iiiillllIIIInnnnddddeeeexxxxaaaabbbblllleeeeSSSSttttaaaacccckkkk(((())))
  51.  
  52.           ilIndexableStack()
  53.  
  54.  
  55.           The constructor takes no arguments and by default allows access to
  56.           the bottom of the stack.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. iiiillllIIIInnnnddddeeeexxxxaaaabbbblllleeeeSSSSttttaaaacccckkkk((((3333))))                   IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll
  71.  
  72.  
  73.  
  74.      ccccllllrrrrBBBBoooottttttttoooommmm(((())))
  75.  
  76.           void clrBottom()
  77.  
  78.  
  79.           Unlinks and deletes the item at the bottom of the stack. It also
  80.           enables access to the bottom of the stack.
  81.  
  82.      ggggeeeettttBBBBoooottttttttoooommmm(((())))
  83.  
  84.           ilLinkItem* getBottom()
  85.  
  86.  
  87.           This function provides a means of knowing what is at the bottom,
  88.           when access to the bottom has been disallowed; This function returns
  89.           a pointer to the bottom item, when access to the bottom has been
  90.           disallowed; returns a NULL otherwise. If access to the bottom is
  91.           allowed, one should use the _f_i_n_d_L_i_n_k(length-1) function, inherited
  92.           from ilIndexableList, to get a pointer to the bottom item.
  93.  
  94.      ggggeeeettttIIIItttteeeemmmmIIIInnnnddddeeeexxxx(((())))
  95.  
  96.           int getItemIndex(ilLinkItem* item)
  97.  
  98.  
  99.           Returns the index of _i_t_e_m.
  100.  
  101.      hhhhaaaassssBBBBoooottttttttoooommmm(((())))
  102.  
  103.           int hasBottom()
  104.  
  105.  
  106.           Returns TRUE if access to the bottom is disallowed; FALSE otherwise.
  107.  
  108.      ppppoooopppp(((())))
  109.  
  110.           void pop(ilLinkItem* item = NULL, int count = 0)
  111.  
  112.  
  113.           This function will pop _i_t_e_m up by _c_o_u_n_t places i.e. it is unlinked
  114.           and inserted _c_o_u_n_t places above its current position.  If _i_t_e_m is
  115.           NULL, then the bottom item (if access to the bottom is disallowed,
  116.           then this is the item above the bottom) is popped up. If _c_o_u_n_t is
  117.           less than or equal to zero or if the specified count overshoots the
  118.           top, then _i_t_e_m is inserted at the top.
  119.  
  120.      ppppuuuusssshhhh(((())))
  121.  
  122.           void push(ilLinkItem* item = NULL, int count = 0)
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. iiiillllIIIInnnnddddeeeexxxxaaaabbbblllleeeeSSSSttttaaaacccckkkk((((3333))))                   IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll
  137.  
  138.  
  139.  
  140.           This function will push _i_t_e_m down by _c_o_u_n_t places i.e. it is
  141.           unlinked and inserted _c_o_u_n_t places below its current position.  If
  142.           _i_t_e_m is NULL, then the top item is pushed down. If _c_o_u_n_t is less
  143.           than or equal to zero or if the specified count overshoots the
  144.           bottom, then _i_t_e_m is inserted at the bottom (if access to the bottom
  145.           is disallowed, then this it is inserted one place above the bottom).
  146.  
  147.      sssseeeettttBBBBoooottttttttoooommmm(((())))
  148.  
  149.           void setBottom(ilLinkItem* item)
  150.  
  151.  
  152.           If access to the bottom is allowed, then _i_t_e_m is simply appended to
  153.           the end of the list, increasing its length by one and further access
  154.           to the bottom is disallowed; if not then the old bottom item is
  155.           unlinked and deleted and replaced by _i_t_e_m, keeping the length of the
  156.           list the same.
  157.  
  158.      sssswwwwaaaapppp(((())))
  159.  
  160.           void swap(ilLinkItem* item1, ilLinkItem* item2)
  161.  
  162.  
  163.           _i_t_e_m_1 and _i_t_e_m_2 on the list get swapped.
  164.  
  165. IIIINNNNHHHHEEEERRRRIIIITTTTEEEEDDDD MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS
  166.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm iiiillllIIIInnnnddddeeeexxxxaaaabbbblllleeeeLLLLiiiisssstttt
  167.      append(), appendAt(), findLink(), head(), insert(), insertAt(),
  168.      isValid(), length(), operator[], tail(), unlink(), unlinkAt()
  169.  
  170. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  171.      ilIndexableList
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.